package ch.bfh.medinfo.smartsmsspeaker.device;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

//Permissions needed:
//<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

//Intent-filters needed:
//<action android:name="android.intent.action.BOOT_COMPLETED" />

public class BootStatusReceiver extends BroadcastReceiver {
	@Override
	public void onReceive(Context context, Intent intent) {
		if (intent == null) {
			return;
		}
		if (intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED)) {
			Log.i("ch.bfh.medinfo", "Booted");
			//Remember this status
			//Do something (calling a service which informs a person per SMS)
		}

	}
}
